home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / README.compat < prev    next >
Text File  |  1996-10-29  |  3KB  |  73 lines

  1. WHAT IS THIS
  2. ------------
  3.  
  4. This file is a collection of things which are different between AROS and the
  5. original AmigaOS and how they are handled in order to be compatible.
  6.  
  7. DIFFERENCES BETWEEN AROS AND THE AMIGA OS
  8. -----------------------------------------
  9.  
  10. * Pointer/Integer conversions
  11.  
  12. If you need a variable which can store a pointers as an integer, don't use
  13. ULONG but IPTR. AROS gurantees that LONG is 32bit on all systems, while
  14. IPTR is always large enough to contain a pointer. Most notable things
  15. which are affected by this: TagItems (the ti_Data field is now an IPTR
  16. instead of ULONG), BOOPSI classes (eg. the return value of DoMethod()),
  17. ReadArgs(), VPrintf(), VFPrintf() and more.
  18.  
  19. * 64bit variables
  20.  
  21. The type of 64bit variables is QUAD (unsigned: UQUAD). This is for example
  22. returned by the function SMult64() of Utility.library. To access the
  23. high- and loworder 32bit values of the 64bit variable, use LOW32OF64()
  24. and HIGH32OF64() which are defined in <aros/64bit.h>.
  25.  
  26. * Cloning RastPorts
  27.  
  28. AROS uses an external driver to access the graphics hardware. Since the
  29. nature of this driver is unknown to AROS, it is no more valid to clone
  30. a RastPort by simply copying it. To be compatible, there are two new
  31. functions (in AROS) or macros (on Amiga): CloneRastPort() and FreeRastPort().
  32. You must call CloneRastPort() to create a copy and FreeRastPort() after
  33. you´ve done your work with it.
  34.  
  35. This approach produces equivalent code on the Amiga but on AROS it can slow
  36. things down a bit. If you must preserve the original state of the RastPort,
  37. it's more save to create a clone, work on it and then dispose it again. It
  38. can also be faster if you would have to make a lot of changes to the RastPort
  39. to create two clones and set them to the two states you need. But your code
  40. should not depend on certain gains or losses of speed due to cloned RastPorts
  41. since the behaviour of the underlying graphics system is undefined.
  42.  
  43. * Tag values
  44.  
  45. The original AmigaOS doesn't use the tags below USER_TAG (have a look at
  46. utility/tagitem.h if you don't belive me) which means, you shouldn't use
  47. tags at or near USER_TAG because then they might interfere with the OS's
  48. own tags. To solve this, AROS *does* use the tags *below* USER_TAG and the
  49. various implementators need not fear that their tags may overlap with the
  50. one from the system. The file include/utility/tagitem.h now contains the
  51. basic offsets for the various parts of the OS. In the future, it might be
  52. possible for users to allocate ranges of tags for specific uses.
  53.  
  54. * DoMethod() or the stack is all wrong !
  55.  
  56. Don't use DoMethod(), use DoMethodA().
  57.  
  58. There are CPUs around which don't care that the rest of the world have
  59. stacks which grow from large to small adresses. HPPA is an example for
  60. this. While it might look neat to the engineers who did it, it breaks our
  61. code. Another thing which breaks the code are small data types (eg. WORD,
  62. UBYTE, etc), because most systems put only integers or longs and pointers
  63. on the stack. So if some Msg structure expects WORD (see
  64. intuition/gadgetclass.h), this fails on every system but the Amiga. To
  65. overcome this, we introduce this rule:
  66.  
  67.     If you want to pass a structure with DoMethod() and DoMethodA()
  68.     or similar functions, you must prepend "STCK" to each type, like
  69.     this: WORD becomes STCKWORD, ULONG becomes STCKULONG, etc.
  70.  
  71. If you want to be save: Don't use DoMethod() at all. It's very likely
  72. that the final AROS release will not support it at all.
  73.